<template>
  <div class="app-container">
    <el-scrollbar>
      <el-row>
        <el-col v-for="help in helpList">
          <div class="helpContainer" v-html="help.content"> </div>
        </el-col>
      </el-row>
    </el-scrollbar>
  </div>
</template>

<script>
import { listHelp } from "@/api/module/help";

import PlatFormHelp from "@/components/Help/index";

export default {
  name: "Help",
  components: {
    PlatFormHelp
  },
  data() {
    return {
      // 按钮loading
      buttonLoading: false,
      // 遮罩层
      loading: true,
      // 导出遮罩层
      exportLoading: false,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 帮助文档表格数据
      helpList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        title: undefined,
        parentId: undefined,
        sort: undefined,
        state: undefined,
        content: undefined
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询帮助文档列表 */
    getList() {
      this.loading = true;
      listHelp(this.queryParams).then(response => {
        this.helpList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
  }
};
</script>

<style lang="scss" scoped>
  .helpContainer{
    position: relative;
    padding: 20px;
  }

  ::v-deep .el-scrollbar__wrap {
    overflow: scroll;
    height: 100%;
    width: 98%;
  }

  .el-scrollbar{
    height: calc(100vh - 13rem);
  }
  ::-webkit-scrollbar {
    display: none;
  }
</style>
